<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/taglib/MyPageLib.tld" prefix="page"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri='/WEB-INF/taglib/Menu.tld' prefix='t'%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
  <head>
    <html:base />
    
    <title>queryHumanFile.jsp</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<LINK href="../css/Style.css" type=text/css rel=stylesheet>
	<LINK href="../css/Manage.css" type=text/css rel=stylesheet>
	<script type='text/javascript' src='/HR_Sys/dwr/interface/JconfigFileBIZ.js'></script>
  	<script type='text/javascript' src='/HR_Sys/dwr/engine.js'></script>
  	<script type='text/javascript' src='/HR_Sys/dwr/util.js'></script>  	
  	<script type="text/javascript" src="/HR_Sys/javascript/My97DatePicker/WdatePicker.js"  defer="defer"></script>
  	<script src='/HR_Sys/javascript/prototype.js'></script>
  	
	<script type="text/javascript">
		function second(){	  		
	  		var second=$("delHumanFile.firstKindId").value;
	  		JconfigFileBIZ.getConfigFileSecondKindList(second,showSecond);
	  	}
	  	function showSecond(data){
	  		var second=$("delHumanFile.secondKindId");						//获得二级机构下拉框对象
	  		//dwr.util.removeAllOptions(second);									//清空二级机构下拉框
	  		//dwr.util.addOptions(second,["---请选择---"]);							//填充二级下拉框
	  		second.options.length=1;
	  		
	  		var third=$("delHumanFile.thirdKindId");							//获得三级下拉框对象
	  		//dwr.util.removeAllOptions(third);									//清空三级下拉框
	  		//dwr.util.addOptions(third,["---请选择---"]);							//填充三级下拉框
	  		third.options.length=1;
	  		
	  		/**
	  		*@param second:填充的对象
	  		*@param data:填充的数据
	  		*@param secondKindId:option的value值
	  		*@param secondKindName:option的display值
	  		**/								
	  		dwr.util.addOptions(second,data,"secondKindId","secondKindName");
	  	}
	  	
	  	function third(){
	  		var third=$("delHumanFile.secondKindId").value;
	  		JconfigFileBIZ.getConfigFileThirdKindList(third,showThird);	  	
	  	}
	  	
	  	function showThird(data){
	  		var third=$("delHumanFile.thirdKindId");							//获得下拉框对象
	  		//dwr.util.removeAllOptions(third);									//晴空下拉框
	  		//dwr.util.addOptions(third,["---请选择---"]);							//填充下拉框
	  		third.options.length=1;
	  		
	  		
	  		/**
	  		*@param third:填充的对象
	  		*@param data:填充的数据
	  		*@param thirdKindId:option的value值
	  		*@param thirdKindName:option的display值
	  		**/								
	  		dwr.util.addOptions(third,data,"thirdKindId","thirdKindName");
	  	}
	  	
	  	function configMajor(){
	  		var major=$("delHumanFile.humanMajorKindId").value;	  		
	  		JconfigFileBIZ.getConfigMajorList(major,showConfigMajor);	  			  	
	  	}
	  	
	  	function showConfigMajor(data){	  	  	
	  		var major=$("delHumanFile.humanMajorId");
	  		//dwr.util.removeAllOptions(major);
	  		//dwr.util.addOptions(major,['---请选择---']);
	  		major.options.length=1;
	  		
	  		dwr.util.addOptions(major,data,'majorId','majorName');
	  	}	
	  	
	  	function getDate()
		{
			var date=new Date();
			var year=date.getYear();
			var month=(date.getMonth()+1);
			var day=date.getDate();		
			
			var time=year+"-"+month+"-"+day;
			
			
			var begintime=document.getElementById('begin');
			var endtime=document.getElementById('end');
			begintime.value='1900-1-1';
			endtime.value=time;
		}
	
	
		function doSubmit()
		{	
			var begintime=document.getElementById('begin');
			var endtime=document.getElementById('end');
			
			//alert(begintime.value.length);
			if(begintime.value.length==0||endtime.value.length==0)
				getDate();			
			document.forms[0].submit();			
		}  	
	  	
	</script>
		
	
  </head>
  
  <body>
  
  <div style="height: 30px; border: solid 1px blue;">
			${user.trueName},欢迎光临！
			<font color="white">${user.name}:${user.id }</font>${params.path}
		</div>
		<div style="border: solid 1px red; height: 100%;">
			<div
				style="height: 100%; width: 180px; border: solid 1px blue; float: left;">
				<t:menu dataSource="menus" width="180"
					iconPath="/icon.do?op=showIcon&icon.id=" colIdName="menuId"
					colParentIdName="menuUpId" colTitleName="menuTitle"
					colSrcName="menuSrc" colIconName="menuPic">${user.id }</t:menu>
			</div>
			<div style="height: 100%; width: 100%; border: solid 1px blue;">
  
  
  
  
  
    <html:form method="post" action="/humanFile.do?op=queryDelHumanFile">
    
   <!-- 判断configFileFirstKindList是否为空，不然转跳action -->
   <bean:size name="humanFileForm" property="configFileFirstKindList" id="size"/>
    <c:if test="${empty requestScope.humanFileForm.configFileFirstKindList and requestScope.delHumanlistSize!=0}">  		
  		<c:redirect url="/humanFile.do?op=queryDelHumanFile"/>  		
  	</c:if>
  	  	
  	<!-- 头部色块 -->
  	<table cellSpacing=0 cellPadding=0 width="98%" border=0>
	  	<tbody>
	  	<tr>
	    <td width=15><IMG src="../images/new_019.jpg" border=0></td>
	    <td width="100%" background="../images/new_020.jpg" height=20></td>
	    <td width=15><IMG src="../images/new_021.jpg" 
	  	border=0></td></tr>
	  	</tbody>
  	</table> 
  	<!-- 头部色块结束 --> 
  	  	 
  	<!-- 中部开始 -->
    <table cellSpacing='0' cellPadding='0' width="98%" border='0'>
	  <tbody>
	  <tr>
	  	<!-- 第一列 -->
	    <td width=15 background="../images/new_022.jpg">
	    	<IMG src="../images/new_022.jpg" border=0>
		</td>
		<!-- 第一列结束 -->
		
		<!-- 第二列 -->				
    	<td  vAlign=top width="100%" bgColor=#ffffff>
  			<table cellSpacing=0 cellPadding=5 width="100%" border=0>
		    	<tr>
		          <td class=manageHead>当前位置：管理首页 &gt; 管理中心 &gt; 渠道商广告申请</td>
				</tr>
		        <tr>
		          <td height=2></td></tr></table> 
  		
  			<!-- 中间表格开始 -->
			<table borderColor=#cccccc cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
       		 <tbody>	  	   	
	  	   	<tr><td>  
  	
  	
  		
  		
  		<br>
  		
    	<table width="100%">
    		<tr>
    			<td width="72">I级机构</td>  		
    			<td>
    				<html:select name="humanFileForm" property="delHumanFile.firstKindId" styleId="delHumanFile.firstKindId"  onchange="second()"   style="width:150px;">
    			 		<html:option value="0">---请选择---</html:option>
    			 		<html:optionsCollection name="humanFileForm" property="configFileFirstKindList" label="firstKindName" value="firstKindId"/>    			 		
    			 	</html:select>    			 	
    			</td>
    			<td width="72">II级机构</td>
    			<td>
    				<html:select name="humanFileForm" property="delHumanFile.secondKindId" styleId="delHumanFile.secondKindId"  onchange="third()"   style="width:150px;">
    			 		<html:option value="0">---请选择---</html:option>
    			 	</html:select>
    			</td>
    			<td width="72">III级机构</td>  
    			<td>
    				<html:select name="humanFileForm" property="delHumanFile.thirdKindId" styleId="delHumanFile.thirdKindId"    style="width:100%;">
    					<html:option value="0">---请选择---</html:option>
    			 	</html:select>
    			</td>    			 
    		</tr>
    		
    		<tr>
    			<td>职位分类</td>
    			<td>
    				<html:select name="humanFileForm" property="delHumanFile.humanMajorKindId" styleId="delHumanFile.humanMajorKindId"  onchange="configMajor()"  style="width:150px;">
    			 		<html:option value="0">---请选择---</html:option>
    			 		<html:optionsCollection name="humanFileForm" property="configMajorKindList" label="majorKindName" value="majorKindId"/>    			 		
    			 	</html:select>  
    			</td>
    			<td>职位名称</td>
    			<td>
    				<html:select name="humanFileForm" property="delHumanFile.humanMajorId" styleId="delHumanFile.humanMajorId"  onchange="configMajor()"  style="width:150px;">
    			 		<html:option value="0">---请选择---</html:option>    			 		    			 		
    			 	</html:select>      			
    			</td>
    			<td>请输入建档时间</td>
    			<td>
    				<input type="text" name="delQueryBeginDate"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate" id="begin"/>&nbsp;至
    				<input type="text" name="delQueryEndDate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate" id="end"/>
					<html:button property="" onclick="doSubmit()">查询</html:button>
					<html:reset property="reset">重置</html:reset>   			
    			</td>    			
    		</tr>    		
    	</table>
    	<br/>
    	<table style="BORDER-TOP-WIDTH: 0px; FONT-WEIGHT: normal; BORDER-LEFT-WIDTH: 0px; BORDER-LEFT-COLOR: #cccccc; BORDER-BOTTOM-WIDTH: 0px; BORDER-BOTTOM-COLOR: #cccccc; WIDTH: 100%; BORDER-TOP-COLOR: #cccccc; FONT-STYLE: normal; BACKGROUND-COLOR: #cccccc; BORDER-RIGHT-WIDTH: 0px; TEXT-DECORATION: none; BORDER-RIGHT-COLOR: #cccccc" 
            cellSpacing=1 cellPadding=2 rules=all border=0>
    		<tr style="FONT-WEIGHT: bold; FONT-STYLE: normal; BACKGROUND-COLOR: #eeeeee; TEXT-DECORATION: none">
    			<td>档案编号</td>
    			<td>姓名</td>
    			<td>性别</td>
    			<td>I级机构</td>
    			<td>II级机构</td>
    			<td>III级机构</td>
    			<td>职位分类</td>
    			<td>职位名称</td>
    			<td>删除</td>
    		</tr>    	
    	<logic:empty name="humanFileForm" property="queryDelHumanFileList">
    		<tr>
    			<td colspan="9">没有满足条件的相关记录</td>
    		</tr>
    	</logic:empty>
    	
    	<logic:notEmpty name="humanFileForm" property="queryDelHumanFileList">
    		<logic:iterate id="human" name="humanFileForm" property="queryDelHumanFileList">
	    		<tr style="FONT-WEIGHT: normal; FONT-STYLE: normal; BACKGROUND-COLOR: white; TEXT-DECORATION: none">

	    			<td><a href="/HR_Sys/humanFile.do?op=toEditHumanFile&hufId=${human.hufId }">${human.humanId }</a></td>
	    			<td>${human.humanName }</td>
	    			<td>${human.humanSex }</td>
	    			<td>${human.firstKindName }</td>
	    			<td>${human.secondKindName }</td>
	    			<td>${human.thirdKindName }</td>
	    			<td>${human.humanMajorKindName }</td>
	    			<td>${human.humanMajorName }</td>
	    			<td>
	    			<c:if test="${human.humanFileStatus==1 }">
	    				<a href="/HR_Sys/humanFile.do?op=doDelTempHumanFile&hufId=${human.hufId }">删除</a>
	    			</c:if>
	    			
	    			<c:if test="${human.humanFileStatus==0 }">
	    				<a href="/HR_Sys/humanFile.do?op=doRevoverTempHumanFile&hufId=${human.hufId }">还原</a>
	    			</c:if>    			
	    			</td>
	    		</tr>    		
    		</logic:iterate>
    	</logic:notEmpty>   	
   	</table>
   	</td></tr>
	    		   
	    	<!-- 分页部分开始 -->
	    	<logic:notEmpty name="humanFileForm" property="queryDelHumanFileList">  
		    	<tr>
		          <td>
		            <page:PageTag file="/HR_Sys/humanFile.do?op=queryDelHumanFile" num="${requestScope.page}"></page:PageTag>
		          </td>
	            </tr>
            </logic:notEmpty>
            <!-- 分页部分结束 -->
            </tbody></table> 	
   	
   	</td>
            <!-- 第二列结束 -->
   
   <!-- 第三列 -->
    <td width=15 background="../images/new_023.jpg"><IMG 
      src="../images/new_023.jpg" border=0> </td></tr>	    	
    	</tbody></table>	
   <!-- 第三列结束 -->  	
   
   <!-- 中部结束 -->
   	
   	
	  <!-- 底部色块 -->
	    <table cellSpacing=0 cellPadding=0 width="98%" border=0>
		  <tbody>
			  <tr>
			    <td width="15"><IMG src="../images/new_024.jpg" border=0></td>
			    <td align="middle" width="100%" background="../images/new_025.jpg" height="15"></td>
			    <td width="15"><IMG src="../images/new_026.jpg" border="0"></td>
			  </tr>
		  </tbody>
	  </table>
	  <!-- 底部色块结束 -->
    </html:form>
  </body>
</html:html>
